home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000283_fdc@sesame.cc.columbia.edu_Wed Sep 17 13:27:16 EDT 2003.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  77 lines

  1. Article: 14525 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news-not-for-mail
  3. From: fdc@sesame.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: automodem?
  6. Date: 17 Sep 2003 13:27:11 -0400
  7. Organization: Columbia University
  8. Lines: 60
  9. Message-ID: <bka5hf$rhg$1@sesame.cc.columbia.edu>
  10. References: <S5N9b.750$A67.607@newssvr22.news.prodigy.com> <bk9s60$4td$1@sesame.cc.columbia.edu> <_g0ab.916$SY5.132@newssvr22.news.prodigy.com>
  11. NNTP-Posting-Host: sesame.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1063819631 16674 128.59.59.56 (17 Sep 2003 17:27:11 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 17 Sep 2003 17:27:11 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14525
  16.  
  17. In article <_g0ab.916$SY5.132@newssvr22.news.prodigy.com>,
  18. Jun Zhang  <nugulus@netscape.net> wrote:
  19. :     After connection, logging in, at the ckermit> prompt, I type hangup
  20. : or quit, modem seems disconnected. These are all fine.
  21. :     Go to the remote host, I noticed that the getty process was replaced
  22. : by -ksh during the succesfull connection, but remain like that after I
  23. : hang up at the client. Next time I use autodial, session will hang after
  24. : I give password.
  25. :     To further explain what I mean: before successful connection, there
  26. : is a process (launched by inittab entry)
  27. :    root 3067 1 0 11:45:45 ttyd0p7 0:00 /usr/sbin/getty -h ttyd0p7 9600
  28. : after the successful connection, the process becomes
  29. :    root 3067 1 0 11:45:45 ttyd0p7 0:00 -ksh
  30. : this process will remain like it is even after the client side modem
  31. : hangup. I have to kill it and let init to respawn, before the new
  32. : autodial session could be successful.
  33. :    The remote host is hpux 11.00. The replacement instead of fork a
  34. : child of the process looks weired. Before looking into that, I would
  35. : like to know if kermit has anything to do with it.
  36. No, it doesn't.  A Kermit script only does the same things that you would
  37. do by hand.  It can't affect interactions between getty and ksh on the
  38. remote host.
  39.  
  40. : To answer my last question: I have to logout during kermit CONNECT mode 
  41. : to recover that remote getty process, and you told me that.
  42. : Can I put shell commands to run at remote host within the autodial 
  43. : script? For instance I need to logout.
  44. Yes, of course you can put dialogs with the host in your script.  Please
  45. read the tutorial near the beginning of the C-Kermit scripts page:
  46.  
  47.   http://www.columbia.edu/kermit/ckscripts.html#tut
  48.  
  49. : I tried to add
  50. : if success connect
  51. : touch /tmp/somefile
  52. : exit
  53. : at the end of autodial script, but I was given the shell prompt of the 
  54. : remote host. Probably this to embed shell script in kermit issue.
  55. As the tutorial says, if you want the script to execute the dialog, then
  56. you must replace the CONNECT command with a series of INPUT and OUTPUT
  57. commands, so:
  58.  
  59.   if success connect
  60.   touch /tmp/somefile
  61.   exit
  62.  
  63. becomes something like:
  64.  
  65.   input 10 {\10$ }    ; (or whatever the shell prompt is)
  66.   if fail exit 1 No shell prompt
  67.   output touch /tmp/somefile\13
  68.   output exit\13
  69.  
  70. - Frank
  71.